package com.example.demo.control;

import com.example.demo.service.GetRoleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

@ResponseBody
@Controller
public class RegistControl {
    @Resource
    GetRoleService getRoleService;
    @PostMapping("getrole")
    String getrole(){
      return getRoleService.getRole();
    }
    @PostMapping("workregist")
    String workRegist(HttpSession session,String workname , String workphone, String workage, String worknumber, String workpass, String workpass2, String roleoption, String workquestionoption, String workanswer){

        return getRoleService.workRegist(session, workname , workphone,workage,worknumber,workpass,workpass2,roleoption,workquestionoption,workanswer);
    }
}
